require 'login_system'
class Plugin::FlickrController < ActionController::Base
  before_filter :set_site_template_root
  def set_site_template_root
    self.class.template_root = "#{RAILS_ROOT}/components/"
    @template.base_path = template_root
  end 
  include LoginSystem
  before_filter :login_required, :only => [:config]
  def show
    require 'models/flickr'
    @plugin=Extplugin.find_by_name("flickr")
	@config=@plugin.config 
    if @plugin.activated==1
	  @flickr=Flickr.new
	  @user=Flickr.new.users(@config["flickruser"].to_s)
  	  render(:layout => false)
  	else
  	  render :text => _("not activated")
  	end 
  end
	
  def config
    @plugin=Extplugin.find_by_name("flickr")
    @config=@plugin.config 
  end
  
end